Skip to content

Conversation

@tbedford
Copy link
Contributor

@tbedford tbedford commented May 13, 2024

Description

This PR adds configuration for the RunLLM Widget.

In order to test this out in a staging / PR preview environment we will need to add the domain where the site is deployed to our database for reCAPTCHA verification.

If you could please provide the preview URL to us we can handle this on our end and we will comment here once resolved.

Please ping @agiron123 for this.

Without reCAPTCHA verification set up, the Widget will at least show up on the bottom right hand corner of the docs site.

Review

View the widget

@tbedford tbedford self-assigned this May 13, 2024
@github-actions
Copy link

github-actions bot commented May 13, 2024

Docs preview site available at https://quixdocsdev.blob.core.windows.net/prdev/index.html

@agiron123
Copy link
Contributor

Hi @tbedford thanks for opening this up again. I'm testing the preview site and am getting a 404 for the runllm-widget.js file.

Perhaps you have more context on this than I do, the file should show here:
https://quixdocsdev.blob.core.windows.net/pr330/javascripts/runllm-widget.js

I'm unfamiliar with your CI/CD process. Is there another step that needs to happen for this file to be included like the other files in the javascripts folder? Or is there a way you could upload the contents to that path so that we can test against this preview site?

@merlin-quix
Copy link
Collaborator

@agiron123 Thanks I can help with this, let me take a look.

@merlin-quix
Copy link
Collaborator

@agiron123

@agiron123 Thanks I can help with this, let me take a look.

I got it working locally, the JS file was recommitted to an incorrect location, just need to figure out why the build isn't picking it up.
image

@agiron123
Copy link
Contributor

@merlin-quix Thanks for the update here Merlin. Let me know if there is anything I can do here to help.

@tbedford tbedford closed this May 14, 2024
@tbedford tbedford reopened this May 14, 2024
@merlin-quix
Copy link
Collaborator

merlin-quix commented May 14, 2024

@merlin-quix Thanks for the update here Merlin. Let me know if there is anything I can do here to help.

@agiron123 Ok, it works now. You can see it online under this link: https://quixdocsdev.blob.core.windows.net/pr330/get-started/welcome.html

Is there anything you need to do on your end to have it return answers?

Note: there seem to be some key conflicts with our "regular" search box. When you press certain keys such as "c" or "f", the regular search box comes into focus, and the AI search disappears - but I'll try to fix this on our end.

@agiron123
Copy link
Contributor

Thanks for all your help here @merlin-quix.

As far as getting answers to show, I have gone ahead and whitelisted your domains:
quixdocsdev.blob.core.windows.net

You should now be able to receive answers from our assistant.

@agiron123
Copy link
Contributor

@merlin-quix Regarding configuring the hotkey, you can configure the RunLLM hotkey here:

script.setAttribute('runllm-keyboard-shortcut', 'Mod+j');

In my testing, I found that the search bar of your production site pops up when I type the s or f key. (search and find, I assume).

This, however, is taking the input focus away from the RunLLM Widget, making it impossible to type a question into the widget. This is a fun use case that I never really accounted for while developing the widget. I'm working on my end to ensure that all inputs are consumed by the widget once open.

I'll let you know once that's ready.

{{ super() }}

<script src="javascripts/feedback.js"></script>
<script src="javascripts/runllm-widget.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the javascripts included from the mkdocs even running, or does this just override everything?

If this is how you wish to include the runllm widget script, we can remove the runllm-widget.js script and entry in mkdocs.yml and replace the line above with the following:

<script
  defer
  id="runllm-widget-script"
  type="module"
  src="https://cdn.jsdelivr.net/npm/@runllm/search-widget@stable/dist/run-llm-search-widget.es.js"
  version="stable"
  runllm-preset="mkdocs"
  runllm-server-address="https://api.runllm.com"
  runllm-assistant-id="111"
  runllm-position="BOTTOM_RIGHT"
  runllm-keyboard-shortcut="Mod+j"
  runllm-slack-community-url="https://quix.io/slack-invite"
  runllm-name="RunLLM"
></script>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agiron123 Thanks - It was my assumption (and perhaps I am wrong) that you had to update the override AND mkdocs.yml if you wanted the new Javascript to kick in or load it at a specific point. I will try your solution anyway.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should just be one I believe, but it's hard to say definitively since people can set up their docs sites differently.

@merlin-quix merlin-quix assigned merlin-quix and unassigned tbedford May 15, 2024
@SteveRosam SteveRosam closed this May 15, 2024
@SteveRosam SteveRosam reopened this May 15, 2024
@SteveRosam SteveRosam closed this May 15, 2024
@SteveRosam SteveRosam reopened this May 15, 2024
@SteveRosam SteveRosam closed this May 15, 2024
@SteveRosam SteveRosam reopened this May 15, 2024
@merlin-quix merlin-quix reopened this May 16, 2024
remove extraneous runllm-widget script tag
@merlin-quix merlin-quix reopened this May 16, 2024
@SteveRosam SteveRosam closed this May 22, 2024
@SteveRosam SteveRosam reopened this May 22, 2024
@tbedford tbedford marked this pull request as ready for review May 22, 2024 13:28
@SteveRosam SteveRosam closed this May 22, 2024
@SteveRosam SteveRosam reopened this May 22, 2024
@tbedford tbedford closed this May 22, 2024
@tbedford tbedford reopened this May 22, 2024
@tbedford tbedford merged commit 99d6ebc into dev May 22, 2024
@tbedford tbedford deleted the run-llm branch May 22, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants